layui
    .extend({
        wangEditor: 'lib/wangEditor/wangEditor',
    })
    .define(['wangEditor'], function (exports) {
        //二次封装wangEditor自动加载CSS
        const layuiWangEditor = layui.wangEditor;
        let styleLink = document.createElement('link');
        styleLink.rel = 'stylesheet';
        styleLink.href = '/static/js/lib/css/wangEditor.css';
        document.head.insertBefore(styleLink, document.head.firstChild);
        exports('editor', layuiWangEditor);
    });
